package com.lmc.controller;

import com.lmc.common.LogInfo;
import com.lmc.common.R;
import com.lmc.pojo.Wallet;
import com.lmc.service.UserService;
import com.lmc.service.WalletService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
public class WalletController {

    @Autowired
    WalletService walletService;

    @Autowired
    UserService userService;

    /**
     * 查询用户钱包余额
     * @param wallet
     * @return
     */
    @LogInfo(describe = "操作用户")
    @GetMapping("/account")
    public R queryByName(@RequestParam Wallet wallet) {
        R<Wallet> walletsInfo = walletService.getWalletsInfo(wallet);
        return R.success(walletsInfo);
    }


}
